<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01-flex-direction</title>
    <style>
        .box {
            display: flex;
            width: 500px;
            border: red dashed 1px;
            margin-bottom: 30px;
        }

        .box-item {
            width: 100px;
            height: 100px;
            line-height: 100px;
            font-size: 50px;
            text-align: center;
            margin: 5px;
            background-color: yellow;
        }

        .box1 {
            flex-direction: row;
        }

        .box2 {
            flex-direction: row-reverse;
        }

        .box3 {
            flex-direction: column;
        }

        .box4 {
            flex-direction: column-reverse;
        }
    </style>
</head>
<body>
<div class="box box1">
    <div class="box-item">1</div>
    <div class="box-item">2</div>
    <div class="box-item">3</div>
    <div class="box-item">4</div>
</div>

<div class="box box2">
    <div class="box-item">1</div>
    <div class="box-item">2</div>
    <div class="box-item">3</div>
    <div class="box-item">4</div>
</div>

<div class="box box3">
    <div class="box-item">1</div>
    <div class="box-item">2</div>
    <div class="box-item">3</div>
    <div class="box-item">4</div>
</div>

<div class="box box4">
    <div class="box-item">1</div>
    <div class="box-item">2</div>
    <div class="box-item">3</div>
    <div class="box-item">4</div>
</div>
</body>
</html>
